<?php

/*
Process Add Pages (admin_add_pages.pro.php)
*/

$rank_check = "7";
include "../global.inc.php";

$check = fetch("SELECT id FROM game_pages2 WHERE page_title = '$page_title' AND game = '$game'");

if ((!$page_title) OR (!$page_content))
{
	die(header(error("admin_add_pages.php?game=$game", "Please do not leave any information blank!")));
}

if ($check[id])
{
	die(header(error("admin_add_pages.php?game=$game", "There is already a page with the name $page_title.")));
}
else
{
	mysql_query("INSERT INTO game_pages2 (page_title,content,game,login_required) VALUES ('$page_title','$page_content','$game','$login_required')");
	header("Location: admin_add_pages.php?game=$game&error=The+page+$page_title+has+been+added!");
}

?>
